package uk.ac.ebi.bioinvindex.model.impl.processing;

import uk.ac.ebi.bioinvindex.model.impl.AnnotatableImpl;
import uk.ac.ebi.bioinvindex.model.impl.StudyImpl;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jul 27, 2007
 */
@MappedSuperclass
public abstract class GraphElementImpl extends AnnotatableImpl{

	protected StudyImpl study;

	protected boolean isOriginal = true;

	protected GraphElementImpl() {

	}

	protected GraphElementImpl(StudyImpl study) {
		this.study = study;
	}

	protected GraphElementImpl(StudyImpl study, boolean original) {
		this.study = study;
		isOriginal = original;
	}

	@ManyToOne( targetEntity = uk.ac.ebi.bioinvindex.model.impl.StudyImpl.class)
	@JoinColumn(name = "STUDY_ID", nullable = false )
	public StudyImpl getStudy() {
		return study;
	}

	public void setStudy(StudyImpl study) {
		this.study = study;
	}

	public boolean isOriginal() {
		return isOriginal;
	}

	public void setOriginal(boolean original) {
		isOriginal = original;
	}
}
